Digital Certificates simpliflied

Digital Certificates are one of the foundation blocks of security in the digital woorld. They are used to authenenticate the identity of the device and secure the tranactions between devices. This section provides a simpliflied overview of the digital certificates.

Symmetric key cryptography

In Symmetric key cryptography same key is used to encrypt and decrypt.

Assymmetric key cryptography (public key cryptography)

Assymmetric key cryptography solves the above mentioned key distribution problem with 2 keys (key pair).

There are different algorithms used for assymmetric key cryptography.

Some algorithms like RSA technically allows you to choose which key is private and which is public. But some others like ECC does not give you a choice as they are dissimilar in computation. Tools like openssl indicate which key to use as private avoiding any confusions here

Key operations

If public key is used to encrypt the message, only the private key can be used to decrypt the message. If private key is used to encrypt the message, only the public key can be used to decrypt the message.

Public keys can be shared to anyone publicly.

Encrytion: Alice shares public key to Bob. Bob uses it to encrypt data and send to Alice. Alice decrypts with private key. Bobody else can decrypt it since they dont have private key

Key exchange

Host name verification

References

https://crypto.stackexchange.com/questions/93641/can-we-pick-which-key-is-private-or-public-in-asymmetric-encryption-do-the-keys